from itsdangerous import TimedSerializer
from meiduo_shop import settings
def varify_email(user_id):
    #创建实例,传入密钥
    serializer = TimedSerializer(settings.SECRET_KEY)
    #加密数据
    data = serializer.dumps(user_id)
    return data